/**
 * Copyright (c) 2016-2020 qar All rights reserved.
 * <p>
 * https://www.qar.io
 * <p>
 * 版权所有，侵权必究！
 */

package com.example.feign.fallback;

import com.example.feign.UserResourceFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 用户接口 FallbackFactory
 *
 * @author Mark sunlightcs@gmail.com
 */
@Slf4j
@Component
public class UserResourceFeignClientFallbackFactory implements FallbackFactory<UserResourceFeignClient> {
    @Override
    public UserResourceFeignClient create(Throwable throwable) {
        return new UserResourceFeignClient() {


            @Override
            public String abc() {
                return null;
            }
        };
    }
}
